<template>
  <el-form :model="ruleForm" :rules="rules" label-position="top">
    <el-form-item label="商品名称" prop="name">
      <el-input v-model="ruleForm.name" />
    </el-form-item>
    <el-form-item label="商品价格" prop="region">
      <el-input v-model="ruleForm.region" />
    </el-form-item>
    <el-form-item label="商品重量" prop="date1">
      <el-input v-model="ruleForm.date1" />
    </el-form-item>
    <el-form-item label="商品数量" prop="date2">
      <el-input v-model="ruleForm.date2" />
    </el-form-item>
    <el-form-item label="商品分类" prop="delivery">
      <el-select v-model="ruleForm.delivery" placeholder="请选择">
        <el-option
          v-for="item in options"
          :key="item.value"
          :label="item.label"
          :value="item.value"
        />
      </el-select>
    </el-form-item>
  </el-form>
</template>

<script>
export default {
  name: 'AddFrom',
  components: {},
  props: {},
  data() {
    return {
      ruleForm: {
        name: '',
        region: 0,
        date1: 0,
        date2: 0,
        delivery: ''
      },
      rules: {
        name: [{ required: true, message: '请输入活动名称', trigger: 'blur' }],
        region: [{ required: true, message: '请输入活动名称', trigger: 'blur' }],
        date1: [{ required: true, message: '请输入活动名称', trigger: 'blur' }],
        date2: [{ required: true, message: '请输入活动名称', trigger: 'blur' }],
        delivery: [{ required: true, message: '请输入活动名称', trigger: 'blur' }]
      },
      options: [{
        value: '选项1',
        label: '黄金糕'
      }, {
        value: '选项2',
        label: '双皮奶'
      }, {
        value: '选项3',
        label: '蚵仔煎'
      }, {
        value: '选项4',
        label: '龙须面'
      }, {
        value: '选项5',
        label: '北京烤鸭'
      }],
      value: ''

    }
  },
  computed: {}, // 计算属性
  watch: {
  },
  created() {
  },
  mounted() {},
  methods: {

  }
}
</script>

<style scoped>

</style>
